package com.qd.common.panda.domain.entity.plate;

import com.cdqidi.util.page.BaseQuery;
import com.cdqidi.valid.group.DefaultGroup;
import com.cdqidi.valid.group.DeleteGroup;
import com.cdqidi.valid.group.UpdateGroup;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;
import java.time.LocalDateTime;

/**
 * 车牌待审核
 *
 * @author sjk
 */
@EqualsAndHashCode(callSuper = true)
@Getter
@Setter
public class UserPlateApprovalDTO extends BaseQuery {

    /**
     * 主键
     */
    @NotBlank(message = "待审核ID不能为空", groups = {DeleteGroup.class, UpdateGroup.class})
    @Size(max = 50, message = "待审核ID长度不能超过{max}位", groups = {DeleteGroup.class, UpdateGroup.class})
    private String approvalId;
    /**
     * 原用户ID
     */
    @Size(max = 50, message = "原用户ID长度不能超过{max}位", groups = DefaultGroup.class)
    private String originalUserId;
    /**
     * 原用户手机号
     */
    @Size(max = 20, message = "原用户手机号长度不能超过{max}位", groups = DefaultGroup.class)
    private String originalMobile;
    /**
     * 申请用户ID
     */
    @Size(max = 50, message = "申请用户ID长度不能超过{max}位", groups = DefaultGroup.class)
    private String userId;
    /**
     * 申请用户手机号
     */
    @Size(max = 20, message = "申请用户手机号长度不能超过{max}位", groups = DefaultGroup.class)
    private String userMobile;
    /**
     * 车辆类型:0燃油车1新能源
     */
    private Integer carType;
    /**
     * 车辆类型显示
     */
    private String carTypeDisplay;
    /**
     * 车牌颜色
     */
    private Integer vehicleColor;
    /**
     * 车牌颜色显示
     */
    private String vehicleColorDisplay;
    /**
     * ETC卡号
     */
    @Size(max = 64, message = "ETC卡号长度不能超过{max}位", groups = DefaultGroup.class)
    private String etcCardId;
    /**
     * ETC支付
     */
    @Size(max = 50, message = "ETC支付长度不能超过{max}位", groups = DefaultGroup.class)
    private String etcPay;
    /**
     * ETC支付显示
     */
    private String etcPayDisplay;
    /**
     * 添加时间
     */
    private LocalDateTime addTime;
    /**
     * 审批状态:0待审核1审核通过2审核未通过
     */
    private Integer approvalStatus;
    /**
     * 审批状态，多个
     */
    private String approvalStatusList;
    /**
     * 审批状态显示
     */
    private String approvalStatusDisplay;
    /**
     * 审批时间
     */
    private LocalDateTime approvalTime;
    /**
     * 审批意见
     */
    @Size(max = 500, message = "审批意见长度不能超过{max}位", groups = DefaultGroup.class)
    private String approvalMsg;
    /**
     * 行驶证正页
     */
    @NotBlank(message = "行驶证正页不能为空", groups = DefaultGroup.class)
    @Size(max = 200, message = "行驶证正页长度不能超过{max}位", groups = DefaultGroup.class)
    private String vehicleLicensePositive;
    /**
     * 行驶证正页显示
     */
    private String vehicleLicensePositiveDisplay;
    /**
     * 行驶证副页
     */
    @NotBlank(message = "行驶证副页不能为空", groups = DefaultGroup.class)
    @Size(max = 200, message = "行驶证副页长度不能超过{max}位", groups = DefaultGroup.class)
    private String vehicleLicenseDeputy;
    /**
     * 行驶证副页显示
     */
    private String vehicleLicenseDeputyDisplay;

    /**
     * 充电自动确认
     */
    @Size(max = 50, message = "充电自动确认长度不能超过{max}位", groups = DefaultGroup.class)
    private String autoConfirmCharge;
    /**
     * 充电自动确认显示
     */
    private String autoConfirmChargeDisplay;
    /**
     * 车牌
     */
    @NotBlank(message = "车牌不能为空", groups = DefaultGroup.class)
    @Size(max = 20, message = "车牌长度不能超过{max}位", groups = DefaultGroup.class)
    private String plateNumber;
    /**
     * 审核人
     */
    @Size(max = 50, message = "审核人长度不能超过{max}位", groups = DefaultGroup.class)
    private String approvalUser;
    /**
     * 审核人显示
     */
    private String approvalUserDisplay;
    /**
     * 审核人单位
     */
    @Size(max = 50, message = "审核人单位长度不能超过{max}位", groups = DefaultGroup.class)
    private String approvalUnit;
    /**
     * 审核人单位显示
     */
    private String approvalUnitDisplay;

    @Override
    public void freeData() {
        this.approvalId = null;
        this.originalUserId = null;
        this.originalMobile = null;
        this.userId = null;
        this.userMobile = null;
        this.carType = null;
        this.carTypeDisplay = null;
        this.vehicleColor = null;
        this.vehicleColorDisplay = null;
        this.etcCardId = null;
        this.etcPay = null;
        this.etcPayDisplay = null;
        this.addTime = null;
        this.approvalStatus = null;
        this.approvalStatusDisplay = null;
        this.approvalTime = null;
        this.approvalMsg = null;
        this.vehicleLicensePositive = null;
        this.vehicleLicensePositiveDisplay = null;
        this.vehicleLicenseDeputy = null;
        this.vehicleLicenseDeputyDisplay = null;
        this.autoConfirmCharge = null;
        this.autoConfirmChargeDisplay = null;
        this.plateNumber = null;
        this.approvalUser = null;
        this.approvalUserDisplay = null;
        this.approvalUnit = null;
        this.approvalUnitDisplay = null;
        this.approvalStatusList = null;
        super.freeData();
    }
}
